---
title: CodeMaps
summary: API reference for CodeMaps.
status: draft
owner: SAIF Claims BOF team
last_reviewed: 2026-08-21
library: SAIF.Business.Policy
reference_type: embedded
---

# CodeMaps

Provides the shared entry points that construct, cache, and optionally refresh the policy code-map objects. Callers use this type instead of newing the map classes directly because their constructors are `Friend`-scoped.

## Purpose
- Centralize creation of the policy code-map objects.
- Cache one instance of each map in a `Static` local for reuse across calls.
- Provide an explicit `refresh` switch when callers need to repopulate the cache from the database.

## Context
- Namespace: `SAIF.Business.Policy.CodeMaps`
- Assembly/package: `SAIF.Business.Policy`

## Public members
| Member | Signature | Purpose |
| --- | --- | --- |
| `GetBenefitJurisdictionCodeMap` | `Public Shared Function GetBenefitJurisdictionCodeMap(ByVal inDPI As IDataPortalInfo, Optional ByVal refresh As Boolean = False) As clsBenefitJurisdictionCodeMap` | Returns the cached benefit-jurisdiction map, rebuilding it from the database when the cache is empty or `refresh` is `True`. |
| `GetManualClassTypeCodeMap` | `Public Shared Function GetManualClassTypeCodeMap(ByVal inDPI As IDataPortalInfo, Optional ByVal refresh As Boolean = False) As clsManualClassTypeCodeMap` | Returns the cached manual-class-type map, rebuilding it from the database when the cache is empty or `refresh` is `True`. |

## Behavioral notes
- Each factory method stores its cache in a `Static` local variable scoped to the function.
- Refreshing a map replaces the cached instance by calling the corresponding `Friend` constructor again.

## Constraints and usage notes
- Both factory methods require `IDataPortalInfo` because the map constructors fetch data through the framework data-access layer.

## Sources
- `SAIF.Business.Policy\CodeMaps\clsBenefitJurisdictionCodeMap.vb`
- `SAIF.Business.Policy\CodeMaps\clsManualClassTypeCodeMap.vb`